#ifndef WEATHERFETCHER_H
#define WEATHERFETCHER_H

#include <QObject>
#include <QNetworkAccessManager>
#include <QNetworkReply>

class WeatherFetcher : public QObject
{
    Q_OBJECT
public:
    explicit WeatherFetcher(QObject* parent = nullptr);
    //*
    void getWeatherInfo(QString cityName);

signals:
    void weatherDataReceived(QByteArray data);
    void weatherError(QString error);

private slots:
    void onNetworkResponse(QNetworkReply* reply);

private:
    QNetworkAccessManager* mNetworkManager;
};

#endif // WEATHERFETCHER_H
